package com.ct.onlinemusic.mapper;

import com.ct.onlinemusic.model.MusicInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MusicInfoMapper {
    int insert(String title, String singer, String time, String url, Integer status, Integer userid);

    @Select("select * from music where id = #{id} and status != 0")
    MusicInfo findMusicById(Integer id);
    Integer updateMusicById(MusicInfo musicInfo);

    Integer updateMusicSel(List<Integer> ids);

    List<MusicInfo> findMusicByTitle(String title);
}
